//
// Created by Asus on 2025/6/2.
//

#include <iostream>
#include <string>
#include <bits/ostream.tcc>
using namespace std;

void demo01() {
    string str = "Hello World!";
    auto subStr = str.substr(1, 3);
    cout << "subStr: " << subStr << endl;

    string email = "hello@126.com";
    int pos = email.find("@");
    string username = email.substr(0, pos);
    cout << "username: " << username << endl;
}

int main(int argc, char *argv[]) {
    demo01();
    return 0;
}
